<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>hello react</title>
</head>
<body>
  <div id="app"></div>
  <script src="https://unpkg.com/react@16/umd/react.development.js"></script>
  <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
  <!-- 生产环境中不建议使用 -->
  <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
  <script type="text/babel">
    // 作为一个react组件，首字母必须大写
    function Jsthin() {
      console.log(this) // 由于babel使用的是严格模式，所以this并不指向window，而是undefined
      return <h1>React 函数组件的定义</h1>
    }
    ReactDOM.render(<Jsthin />, document.getElementById('app'))
    /* 
      执行过程

    */
  </script>
</body>
</html>